//
//  BDMapView.m
//  RNIbuildModuleBaiduMap
//
//  Created by Wentao Ye on 19/05/2017.
//  Copyright © 2017 Facebook. All rights reserved.
//

#import "BDMapView.h"

@implementation BDMapView

- (void)setMapAnnotations:(NSArray<BDMapAnnotation *> *)mapAnnotations {
    
    [super removeAnnotations:self.annotations];
    [super addAnnotations:mapAnnotations];
}

-(void)setMapUpdateStatus:(MapStatusInfo *)mapUpdateStatus
{
    
    if(mapUpdateStatus.locationX && mapUpdateStatus.locationY)
    {
        [self setCenterCoordinate:CLLocationCoordinate2DMake([mapUpdateStatus.locationY doubleValue], [mapUpdateStatus.locationX doubleValue]) animated:NO];
    }
    if(mapUpdateStatus.zoomLevel != nil  ){
        [self setZoomLevel:[mapUpdateStatus.zoomLevel floatValue]];
    }
}
@end
